
import { createCustomMethodDecorator } from "@midwayjs/core";

// 装饰器内部的唯一 id
export const HASPERMISSION_KEY = "decorator:hasPermission_key";

export function hasPermi(str: string): MethodDecorator {
    // 我们传递了一个可以修改展示格式的参数
    return createCustomMethodDecorator(HASPERMISSION_KEY, { str });
}